package fictional.Common;

/**
 * Represents a Place item.
 */
public class PlaceItem extends DBItem implements Comparable<PlaceItem> {

	/**
	 * Returns a new Place object.
	 * @param id The id
	 * @param mid The mid
	 */
	public PlaceItem(int id, String mid) {
		super(id, mid);
	}
	
	public PlaceItem(int id, String mid,String name) {
		super(id, mid);
		this.place = name;
	}
	
	public void setPlace(String place) {
		this.place = place;
	}
	public String getPlace() {
		return place;
	}
	
	@Override
	public String toString()
	{
		return getPlace();
	}
	
	public int compareTo(PlaceItem s) {
		if (s.getPlace().equals(this.getPlace()))
			return 0;
		else
			return (s.getPlace().compareTo(this.getPlace())) < 1 ? 1 : -1;
	}
	
	private String place;
}
